if exists (select null from sys.procedures where name = 'sp_add_timeline_to_profile')
	drop procedure sp_add_timeline_to_profile;
go

create procedure sp_add_timeline_to_profile
	@profile_id int,
	@hour_beg tinyint,
	@hour_end tinyint,
	@week_day tinyint,
	@prc float
as
begin
	set nocount on;
	
	insert into timelines(profile_id, hour_beg, hour_end, week_day, prc)
	values(@profile_id, @hour_beg, @hour_end, @week_day, @prc);
end;
go

grant execute on sp_add_timeline_to_profile to prg;